package com.mjkj.demo.core.exception;

/**
 * @author XuDoom
 * @date 2023/1/11 20:59
 */
public interface ErrorCodeConstants {

    // ========== 企业模块 1002000000 ==========

    ErrorCode ENTERPRISE_PARAMETER_ERROR = new ErrorCode(1002000000, "传入参数错误");
    ErrorCode ENTERPRISE_NAME_DUPLICATE = new ErrorCode(1002000001, "该企业名重复");
    ErrorCode ENTERPRISE_ADMIN_NOT_EXISTS = new ErrorCode(1002000002, "该管理员代码不存在");
    ErrorCode ENTERPRISE_NOT_EXISTS = new ErrorCode(1002000003, "该企业不存在");
    ErrorCode ENTERPRISE_DEADLINE_ERROR = new ErrorCode(1002000004, "截止时间错误");
    // ========== 审核模块 1002000100 ==========

    ErrorCode AUDIT_ADMIN_NOT_EXISTS = new ErrorCode(1002000101, "管理员不存在");
    ErrorCode AUDIT_ID_NOT_EXISTS = new ErrorCode(1002000102, "审核id不存在");
    ErrorCode AUDIT_FINISH = new ErrorCode(1002000103, "该审核已结束");
    ErrorCode AUDIT_REFUSE_REASON_NOT_ENOUGH = new ErrorCode(1002000104, "拒绝理由不够充分");
    ErrorCode AUDIT_ERROR = new ErrorCode(1002000105, "该审核发生错误");

    // ========== 权限模块 1002000200 ==========

    ErrorCode NO_PERMISSION = new ErrorCode(1002000201, "无此权限");

    /**
     * 统一的id不存在异常
     */
    ErrorCode ID_NOT_EXISTS = new ErrorCode(201, "id不存在");
    ErrorCode EXERCISE_IS_DEADLINE = new ErrorCode(201, "练习已经截止，无法学习");
    ErrorCode EXAMINATION_IS_DEADLINE = new ErrorCode(201, "考试已经截止，无法考试");

    /**
     * 文件删除失败
     */
    ErrorCode FILE_REMOVE_FAIL = new ErrorCode(201, "文件删除失败");
    ErrorCode DOCX_TRANSFORM_FAIL = new ErrorCode(201, "docx文件转换失败");
    ErrorCode DOCX_FILE_NOT_EXISTS = new ErrorCode(201, "docx文件不存在");

    /**
     * 统一的参数错误
     */
    ErrorCode PARAMETER_ERROR = new ErrorCode(201, "参数错误");

    /**
     * 系统相关的异常
     */
    ErrorCode ACCOUNT_DISABLED = new ErrorCode(201, "账户被禁用");
    ErrorCode USERNAME_OR_PASSWORD_ERROR = new ErrorCode(201, "用户名或密码错误");
    ErrorCode ACCOUNT_DISABLED_FAILED = new ErrorCode(201, "账户禁用失败");
    ErrorCode INVALID_USERNAME = new ErrorCode(201, "无效用户名");
    ErrorCode USERNAME_DUPLICATE = new ErrorCode(201, "用户名重复");
    ErrorCode USERNAME_CREATE_FAIL = new ErrorCode(201, "该角色尚未分配菜单，无法创建用户！");
    ErrorCode UPDATE_PASSWORD_FAILED = new ErrorCode(201, "修改密码失败");
    ErrorCode OLD_PASSWORD_ERROR = new ErrorCode(201, "旧密码不正确");
    ErrorCode RESET_PASSWORD_FAILED = new ErrorCode(201, "重置密码失败");

    /**
    * 业务相关的异常
    */
    ErrorCode NAME_DUPLICATE = new ErrorCode(201, "名字重复");
    ErrorCode ORDER_IN_PROGRESS = new ErrorCode(201, "订单正在进行中，无法改变");
    ErrorCode PRODUCT_DUPLICATE = new ErrorCode(201, "产品重复");
    ErrorCode COMMIT_ERROR = new ErrorCode(201, "提交有误");
    ErrorCode CODE_DUPLICATE = new ErrorCode(201, "编号重复");

    ErrorCode ORDER_TIMEOUT = new ErrorCode(201, "无法找到分配方案，请调整未开始订单的交货日期并重新分配！");


}
